Array.prototype.myForEach = function (fn) {
  var arr = this
  var len = arr.length
  var arg2 = arguments[1] || window;
  console.log(arg2);
  for (var i = 0; i < len; i++) {
    fn.apply(arg2, [arr[i], i, arr])
  }
}

function deepClone(obj, des) {
  var des = des || {},
    toStr = Object.prototype.toString,
    arrType = '[object Array]',
    hasOwn = Object.prototype.hasOwnProperty
  for (var key in obj) {
    if (hasOwn.call(obj, key)) {
      if (typeof obj[key] === 'object') {
        des[key] = toStr.call(obj[key]) === arrType ? [] : {}
        deepClone(obj[key], des[key])
      } else {
        des[key] = obj[key]
      }
    }
  }
  return des
}